package com.ming.easyDevelop.entity.po;

import java.io.Serializable;
import java.util.Date;
import com.ming.easyDevelop.utils.DateUtils;
import com.ming.easyDevelop.entity.baseEnum.DateTimePatternEnum;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description 
 * @Author ming
 * @Date 2024/07/10
 */
public class Coupons implements Serializable {


	public Coupons(){
	}	public Coupons(String couponCode, BigDecimal discount, Date expirationDate, Integer isUsed, Integer usedByUserID){
		this.couponCode = couponCode;
		this.discount = discount;
		this.expirationDate = expirationDate;
		this.isUsed = isUsed;
		this.usedByUserID = usedByUserID;
	}	/**
	 * 
	 */
	private String couponCode;

	/**
	 * 
	 */
	private BigDecimal discount;

	/**
	 * 
	 */
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date expirationDate;

	/**
	 * 
	 */
	private Integer isUsed;

	/**
	 * 
	 */
	private Integer usedByUserID;

	public void setCouponCode(String couponCode){
		this.couponCode = couponCode;
	}

	public String getCouponCode(){
		return this.couponCode;
	}

	public void setDiscount(BigDecimal discount){
		this.discount = discount;
	}

	public BigDecimal getDiscount(){
		return this.discount;
	}

	public void setExpirationDate(Date expirationDate){
		this.expirationDate = expirationDate;
	}

	public Date getExpirationDate(){
		return this.expirationDate;
	}

	public void setIsUsed(Integer isUsed){
		this.isUsed = isUsed;
	}

	public Integer getIsUsed(){
		return this.isUsed;
	}

	public void setUsedByUserID(Integer usedByUserID){
		this.usedByUserID = usedByUserID;
	}

	public Integer getUsedByUserID(){
		return this.usedByUserID;
	}

	@Override
	public String toString(){
		return "Coupons = {" + 
				"couponCode() = " + this.couponCode + 
				",discount() = " + this.discount + 
				",expirationDate() = " + DateUtils.format(this.expirationDate,DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()) + 
				",isUsed() = " + this.isUsed + 
				",usedByUserID() = " + this.usedByUserID + 
			"}";
	}
}